/**
 * Window. Screen space where draw some content
 * 
 * This class is abstract the subclasses add some behaviour
 */
abstract class Window
{
  // Coordinates and size
  int x;
  int y;
  int width;
  int height;

  // background color
  int bgColor = 0x000000;  
  
  /**
   * Updates the location of the window
   *
   * @param x new x coordinate
   * @param y new y coordinate
   */   
  void location(int x, int y)
  {
    this.x = x;
    this.y = y;    
  }

  /**
   * Updates the size of the window
   *
   * @param width new width
   * @param height new height
   */
  void size(int width, int height) 
  {
    this.width = width;
    this.height = height;
  }
  
  /**
   * Drawing the component
   *
   * This method is abstract beacuse the subclasses mus spsecified 
   * they own implementation.
   */
  abstract void draw();
  
  /**
   * Method call when a key is pressed
   *
   * The window class don't perform any action
   */
  void keyPressed()
  {
  }
}
